import request from '../../utils/request';
import qs from "qs"
/**
 * 构造物详情
 * @param {*} info 
 */
export function queryStructureInfo(params){
    return request('/design/definition/detail', {
        method: 'post',
        data: params
    });
}
/**
 * 构造物列表
 * @param {*} info 
 */
export function queryStructures(params){
    return request('/design/definition/list', {
        method: 'post',
        data: params
    });
}
/**
 * 项目引用构造物列表
 * @param {*} info 
 */
export function queryProjectStructures(params){
    return request('/design/definition/projectRefed', {
        method: 'post',
        data: params
    });
}
/**
 * 引用构造物
 * @param {*} info 
 */
export function refStructure(params){
    return request('/design/definition/ref', {
        method: 'post',
        data: params
    });
}
/**
 * 添加构造物
 * @param {*} info 
 */
export function addStructure(params){
    return request('/design/definition/add', {
        method: 'post',
        data: params
    });
}
/**
 * 配置单个构造物
 * @param {*} info 
 */
export function deployComponent(params){
    return request('/design/component/deployComponent', {
        method: 'post',
        data: params
    });
}
/**
 * 获取指定墩位构造物
 */
export function getComponentBySpanId(params){
    return request('/design/component/getComponentBySpanId', {
        method: 'post',
        data: params
    });
}
/**
 * 获取指定桥梁上部构造物
 */
export function getTopComponent(params){
    return request('/design/component/getTopComponent', {
        method: 'post',
        data: params
    });
}
/**
 * 获取指定桥梁构造物详情
 */
export function getComponentDetail(params){
    return request('/design/component/detail', {
        method: 'post',
        data: params
    });
}
/**
 * 获取伸缩缝构件
 */
export function getExpansionJoint(params){
    return request('/design/definition/getExpansionJoint', {
        method: 'post',
        data: params
    });
}
/**
 * 获取下部构造物列表
 */
export function getBotStructures(params){
    return request('/design/componentInstance/getBottomDefinitionInstanceBySpanId', {
        method: 'post',
        data: params
    });
}
/**
 * 获取上部构造物列表
 */
export function getTopStructures(params){
    return request('/design/componentInstance/getTopDefinitionInstanceBySelectId', {
        method: 'post',
        data: params
    });
}
/**
 * 获取构造物树
 */
export function getStructureTree(params){
    return request('/design/definitionTree/group', {
        method: 'post',
        data: params
    });
}
/**
 * 根据桥梁获取构下部构造物
 */
export function getBotStructuresByBridge(params){
    return request('/design/componentInstance/getBottomDefinitionInstance', {
        method: 'post',
        data: params
    });
}
/**
 * 根据桥梁获取构上部构造物
 */
export function getTopStructuresByBridge(params){
    return request('/design/componentInstance/getTopDefinitionInstance', {
        method: 'post',
        data: params
    });
}
/**
 * 根据默认上部构造物实例
 */
export function getTopStructureInstance(params){
    return request('/design/definition/getDefualtComponent', {
        method: 'post',
        data: params
    });
}
/**
 * 根据构造物实例列表
 */
export function getDefinitionList(params){
    return request('/design/definition/list', {
        method: 'post',
        data: params
    });
}
/**
 * 根据构造物实例详情
 */
export function getDefinitionDetail(params){
    return request('/design/definition/getDefinitionDetail', {
        method: 'post',
        data: params
    });
}
/**
 * 添加上部\下部构造物
 */
export function addDefinitionInstance(params){
    return request('/design/componentInstance/addDefinitionInstance', {
        method: 'post',
        data: params
    });
}
/**
 * 下部构造物实例列表
 */
export function getBottomDefinitionInstanceList(params){
    return request('/design/componentInstance/getBottomDefinitionInstanceList', {
        method: 'post',
        data: params
    });
}
/**
 * 上部构造物实例列表
 */
export function getTopDefinitionInstanceList(params){
    return request('/design/componentInstance/getTopDefinitionInstanceList', {
        method: 'post',
        data: params
    });
}
/**
 * 根据id获取下部构造物列表
 */
export function getBotDefinitionInstanceListById(params){
    return request('/design/componentInstance/getBottomDefinitionInstanceBySpanIdOrBridgeId', {
        method: 'post',
        data: params
    });
}
/**
 * 根据id获取上部构造物列表
 */
export function getTopDefinitionInstanceListById(params){
    return request('/design/componentInstance/getTopDefinitionInstanceBySelectionIdOrBridgeId', {
        method: 'post',
        data: params
    });
}
/**
 * 获取构件详情
 */
export function getDefinitionInstanceDetail(params){
    return request('/design/componentInstance/getDefinitionInstanceDetail', {
        method: 'post',
        data: params
    });
}
/**
 * 修改构件属性
 */
export function updateDefinitionInstanceProperties(params){
    return request('/design/componentInstance/updateDefinitionInstanceProperties', {
        method: 'post',
        data: params
    });
}
/**
 * 批量修改构件属性
 */
export function updateBatchDefinitionInstanceProperties(params){
    return request('/design/componentInstance/updateBatchDefinitionInstanceProperties', {
        method: 'post',
        data: params
    });
}
/**
 * 删除构件
 */
export function deleteDefinitionInstance(params){
    return request('/design/componentInstance/deleteDefinitionInstance', {
        method: 'post',
        data: params
    });
}
/**
 * 替换构造物
 */
export function replaceDefinitionInstance(params){
    return request('/design/componentInstance/replaceDefinitionInstance', {
        method: 'post',
        data: params
    });
}
/**
 * 构造物属性字典
 */
export function definitionTreeAttrList(params){
    return request('/design/definitionTreeAttr/list', {
        method: 'post',
        data: params
    });
}
/**
 * 构造物属性字典
 */
export function getSectionComponents(params){
    return request('/design/componentInstance/getTopDefinitionInstanceBySelectionListIdOrBridgeId', {
        method: 'post',
        data: params
    });
}
/**
 * 上部联
 */
export function getTopDefinitionInstanceBySelectionList(params){
    return request('/design/selectionList/list', {
        method: 'post',
        data: params
    });
}
/**
 * 构造物属性字典
 */
export function updateTopComponentProps(params){
    return request('/design/componentInstance/updateBatchTopDefinitionInstanceProperties', {
        method: 'post',
        data: params
    });
}
/**
 * 构造下部类型
 */
export function getBottomDefinitionTreeList(params){
    return request('/design/definitionTree/getBottomDefinitionTreeList', {
        method: 'post',
        data: params
    });
}
/**
 * 构造上部类型
 */
export function getTopDefinitionTreeList(params){
    return request('/design/definitionTree/getTopDefinitionTreeList', {
        method: 'post',
        data: params
    });
}
/**
 * 获取下部构件计算属性
 */
export function getBottomProperty(params){
    return request('/design/componentInstance/getBottomProperty', {
        method: 'post',
        data: params
    });
}

/**
 * 批量修改上部构造物属性
 */
export function updateBatchTopDefinitionInstanceProperties(params){
    return request('/design/componentInstance/updateBatchTopDefinitionInstanceProperties', {
        method: 'post',
        data: params
    });
}

/**
 * 添加下部构造物计算属性
 */
export function addBottomProperty(params){
    return request('/design/componentInstance/updatePropertys', {
        method: 'post',
        data:params
    });
}
/**
 * 自定义属性构件构件树
 */
export function getCateTree(params){
    return request('/design/definitionCategory/treeList', {
        method: 'post',
        data:{
            data:params
        },
    });
}
/**
 * 构造物文件上传
 */
export function uploadAndAnalyzing(params){
    return request('/design/definition/uploadAndAnalyzing', {
        method: 'post',
        data:params
    });
}
/**
 * 删除构建模板
 */
export function deleteDefinition(params){
    return request('/design/definition/delete', {
        method: 'post',
        data:params
    });
}
/**
 * 新增构建模板与属性
 */
export function addDefinition(params){
    return request('/design/definition/addSave', {
        method: 'post',
        data:params
    });
}
/**
 * 修改构建模板与属性
 */
export function updateDefinition(params){
    return request('/design/definition/update', {
        method: 'post',
        data:params
    });
}
/**
 * 获取构建模板与属性
 */
export function getDefinitionPropertyByDefinitionId(params){
    return request('/design/definition/getDefinitionPropertyByDefinitionId', {
        method: 'post',
        data:params
    });
}
/**
 * 获取支座列表
 */
export function getBearingPlinthByBridgeId(params){
    return request('/design/bearingPlinth/getBearingPlinthByBridgeId', {
        method: 'post',
        data:params
    });
}
/**
 * 批量添加支座
 */
export function addBachBearingPlinth(params){
    return request('/design/bearingPlinth/addBatch', {
        method: 'post',
        data:params
    });
}
/**
 * 更新支座子类信息
 */
export function updateBearingPlinthSub(params){
    return request('/design/bearingPlinthSub/update', {
        method: 'post',
        data:params
    });
}
/**
 * 批量删除支座
 */
export function deleteBatchBearingPlinthSub(params){
    return request('/design/bearingPlinth/deleteBatch', {
        method: 'post',
        data:params
    });
}
/**
 * 
根据支座ids获取支座子类信息
 */
export function getByBearingPlinthIds(params){
    return request('/design/bearingPlinth/getByBearingPlinthIds', {
        method: 'post',
        data:params
    });
}










